<?php

/*

The price is right (price_game.php)

*/

$rank_check = 1;
$page_title = "The price is right";
include "header.inc.php";

$fetch = fetch("SELECT * FROM price_game2 WHERE user = '$userid' AND game = '$game'");

if (!$fetch[item])
{
	echo $openHTML;
	echo "<p>Want to play the price is right? For just 50 $pointsVar you can tell me whether the mystery item is priced too high or too low. If you think you know your items well enough, take the challenge.</p><p align=center><a href=$base_url/price_game.pro.php?game=$game&act=start>Play!</a></p>";
	echo $closeHTML;
}
else
{
	echo $openHTML;
	$get_item = fetch("SELECT * FROM items2 WHERE item_name = '$fetch[item]' AND game = '$game'");
	echo "<p>Ready to play?</p><p align=center><b>$fetch[item]</b><br><img src=$base_url/images/user_images/opg_$game/items/item_$get_item[id].gif><br>Price: <b>$fetch[guess] $pointsVar</b></p><p align=center><a href=$base_url/price_game.pro.php?game=$game&act=guess&guess=high>I think a $fetch[item] costs LESS THAN $fetch[guess] $pointsVar.</a><br><a href=$base_url/price_game.pro.php?game=$game&act=guess&guess=low>I think a $fetch[item] costs MORE THAN $fetch[guess] $pointsVar.</a></p>";
	echo $closeHTML;
}

?>